<%@ include file="../common/IncludeTop.jsp" %>


<div id="BackLink">

  <a href='/catalog/view?categoryId=<c:out value="${product.categoryId}" />'>
    Return to <c:out value="${product.categoryId}"/>
  </a>

</div>

<div id="Catalog">

  <h2><c:out value="${product.name}"/></h2>

  <table>
    <tr><th>Item ID</th>
		<th>Product ID</th>
		<th>Description</th>
		<th>List Price</th>
		<th>&nbsp;</th></tr>
	  <c:forEach var="item" items="${itemList}">
      <tr>
        <td>
          <a href='/item/view?itemId=<c:out value="${item.itemId}"/>'> ${item.itemId} </a>
		</td>
        <td>${product.productId}</td>
        <td>	${item.attribute1}
				${item.attribute2}
				${item.attribute3}
				${item.attribute4}
				${item.attribute5}
				${product.name}
        </td>
        <td>
			<fmt:formatNumber value="${item.listPrice}" pattern="$#,##0.00" />
		</td>
        <td><a class="Button" href='/cart/add?workingItemId=<c:out value="${item.itemId}"/>'>
          Add to Cart</a></td>
      </tr>
    </c:forEach>
    <tr><td>
      <logic:notEqual name="itemList" property="firstPage" value="true">
        <a class="Button" href="switchItemListPage.shtml?pageDirection=previous">&lt;&lt; Prev</a>
      </logic:notEqual>
      <logic:notEqual name="itemList" property="lastPage" value="true">
        <a class="Button" href="switchItemListPage.shtml?pageDirection=next">Next &gt;&gt;</a>
      </logic:notEqual>
    </td></tr>
  </table>

</div>

<%@ include file="../common/IncludeBottom.jsp" %>





